-> root -> OS -> GNU Linux -> Distribution -> ::OS::GNU Linux::Distribution::Debian
Notes and stuff regarding Debian GNU/Linux.
Notes on this page:

Adding the debian logo before the login prompt
[19]

Just run:
# apt-get install linuxlogo
and follow the instructions. Tipically, you will have to modify the file /etc/inittab and add something like:
2:23:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty2

Setting up raid partitions, 0xfd, and mdadm configuration file
[26]

As you can read on the Linux Software RAID HOWTO, you should set the type of raid partitions to 0xfd. Note, however, that there are two ways to assemble raid devices:

  • asking the kernel to do it automatically, at boot time.

  • by running mdadm or the raidhot tools right at boot time, telling them to assemble raid devices.

Setting the type of the partition to 0xfd is necessary only for raid devices that need to be automatically assembled by the kernel itself at boot time.

In practice: if you put 0xfd in the type flag of the partition table, the device will be automatically assembled at boot time. If you don't, you will need to configure mdadm and/or raidhot tools to do that for you (at boot time), or you will have to assemble the device manually.

To create the mdadm configuration file, you have two choices: one, create it manually, two, run
  # mdadm --examine --scan > mdadm.conf 
  or 
  # mdadm --detail --scan > mdadm.conf
  
(the two commands give the same output, sometimes in a different order). These commands require your raid devices to be active and available. If they are not active, you can either assemble them manually, and run the above commands, or use the command:
  # mdadm --examine --brief --scan --config=partitions > mdadm.conf
  
The standard location for the mdadm.conf file, on Debian systems, is /etc/mdadm/mdadm.conf.

Blocking spam from reaching your console.
[39]

By default, the linux kernel will output lot of different kind of messages on your console. To disable them, you can run:
   dmesg -n1
   
to tell the kernel to only send panic messages to your console. This is useful, for example, when you have enabled log martian in the kernel, added some -j LOG in iptables, or you have some hardware problem that's causing the kernel to spam you.

If you don't have a prompt, or it's too hard to write, and have emergency sysctl enabled in your kernel, you can try pressing ctrl+alt+stamp+1 (aka ctrl+alt+sysreq+1).

If you want this parameter to be automatically set at every reboot, you can add the -c1 parameter to klogd, in /etc/init.d. To do so in Debian, you need to modify /etc/default/klogd, to have something like:
   KLOGD="-c1 [whatever parameter was already there]"
   

Note that even though this parameter is set to 1, the messages will still go to syslogd, which can decide that the message is important enough to be outputted in your console. Either stop syslogd temporarily, or change /etc/syslog.conf if it bothers you.

apt-get error: E: Dynamic MMap ran out of room
[42]

Just add the parameter:
 APT::Cache-Limit "141943904";
 
in /etc/apt/apt.conf. Create it if necessary. Increase the number if you still have troubles.

Logging the boot output
[45]

You have an init script failing with some weird error? The console is remote, and you need to check what's happening during the boot process? In Debian, nowdays, you can enable bootlogd to save whatever is outputted on the console during the boot process. In /etc/defaults/bootlogd, just add the line:
 BOOTLOGD_ENABLE=yes
 
Not everything is logged, but it's much better than not having it. Just check dmesg, and the file /var/log/boot.

Using cryptpart and suspend to disk in Debian, and encrypted root
[46]

At time of writing, if you want to use cryptsetup, dmcrypt, and all those cool new things, the only option you have to be able to boot your system out of an encrypted root partition is to use mkinitramfs. Both yaird and mkinitrd are unable to generate images supporting resume from swap AND encrypted filesystems. Just:
 apt-get install mkinitramfs
 
and change /etc/kernel-img.conf, to have something like:
 ramdisk = mkinitramfs
 
now, install the kernel you want, do all the setup you need to do to have all the encryption you want, and finally run:
 % uname -a 
 Linux matteotti 2.6.8-3-686-smp #1 SMP Tue Dec 5 23:17:50 UTC 2006 i686 GNU/Linux
 % update-initramfs -k 2.6.8-3-686-smp -u
 
or similar. Make sure you have a backup of /boot/initrd.whatever handy in case initramfs generated an unusable ramdisk (it can easily happen!)

setlocale failing, and strange locale behavior
[49]

On any linux systems, setlocale will fail unless you have the data for the selected locale compiled and available.

The symptoms range from:

  • setlocale() returning NULL

  • scripts returning errors like:
    perl: warning: Setting locale failed.
    

  • web interfaces like imp, squirrel, or horde ignoring the language and the settings you selected

In Debian, to select the locales you want compiled and available, you need to use the command:
   % dpkg-reconfigure -plow locales
   

This script will generate a file /etc/locale.gen listing all the locales that you are interested into. It will then call /usr/sbin/update-locale and /usr/sbin/locale-gen, which is the real script that takes care of compiling the locale files by running something like:
   % localedef -i en_EN -c -f ISO-8859-15 -A /usr/share/locale/locale.alias en_EN
   
localedef, at least in Debian, will update the files in /usr/lib/locale/*

Generated by CRON on 2012/02/14 at 06:26:35.